<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        var year = 1900;
        var count = 0;        //闰年的个数
        while (year <= 2020){
            if (year % 4 === 0 && year % 100 !== 0 || year % 400 ===0){
                document.write(year + "&nbsp;");
                count++;
                if (count % 6 === 0) {
                    document.write("<br>");
                }
            }
            year++;
        }

    </script>
</head>
<body>

</body>
</html>